package org.listbeast.core.common;

import java.util.Date;
import java.util.Locale;

public class ApplicationInformationImpl implements ApplicationInformation {

    private final Date startTime;
    private final String applicationName;
    private final String applicationVersion;
    private final String operatingSystemInformation;
    private final String javaVirtualMachineInformation;
    
	public ApplicationInformationImpl() {
        applicationName     = "ListBeast";
        applicationVersion = "1.0";
		operatingSystemInformation = System.getProperty("os.name") + " (Version " + System.getProperty("os.version") + "), on " + System.getProperty("os.arch") + " architecture";
        
        javaVirtualMachineInformation = "JDK '" + System.getProperty("java.version") +
                "' of '" + System.getProperty("java.vendor") +
                "', specification version '" + System.getProperty("java.vm.specification.version") +
                "', specification name '" + System.getProperty("java.vm.specification.name") +
                "', vm name '" + System.getProperty("java.vm.name") +
                "', vm version '" + System.getProperty("java.vm.version") +
                "', vendor '" + System.getProperty("java.vm.vendor") +
                "'";
	
        startTime = new Date();
	
	}
	
	@Override
	public String getOperatingSystemInformation() {
		return operatingSystemInformation;
	}

	@Override
	public String getJavaVirtualMachineInformation() {
		return javaVirtualMachineInformation;
	}

	@Override
	public Date getStartTime() {
		return startTime;
	}

	@Override
	public String getApplicationVersion() {
		return applicationVersion;
	}

	@Override
	public String getApplicationName() {
		return applicationName;
	}

}
